var a_right2 = echarts.init(document.getElementById('r2'), "dark");

var a_right2_option = {
    title: {
        text: '坐席排行榜',
        subtext: ''
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        }
    },
    legend: {
        data: ['成交量', '呼通量']
    },
    grid: {
        left: '1%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: {
        type: 'value',
        boundaryGap: [0, 0.01]
    },
    yAxis: {
        type: 'category',
        data: ['xxx', 'aaa', 'bbb', 'ccc', 'ddd']
    },
    series: [{
            name: '成交量',
            type: 'bar',
            data: [1820, 3489, 9034, 4970, 31744, 30230]
        },
        {
            name: '呼通量',
            type: 'bar',
            data: [1932, 3438, 1000, 1594, 34141, 81807]
        }
    ]
};

a_right2.setOption(a_right2_option)

window.addEventListener("resize", () => {
    a_right2.resize();
});